SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetItemOptionsForItemFromRefcode]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[GetItemOptionsForItemFromRefcode]
GO

/***************************************************************************
* Name:			GetItemOptionsForItemFromRefcode
* Purpose:		Returns all the item options with the specified refdomain
*
*
* PARAMETERS
* Name			Description					
* -------------		-----------------------------------------------------------
* @optionsRefDomain 	refdomain for the option
***************************************************************************/
CREATE PROCEDURE [dbo].[GetItemOptionsForItemFromRefcode] 

	@optionsRefDomain varchar(100)

AS

BEGIN

	SELECT -1 as [ID], -1 as ItemID, RefMeaning as OptionText, RefCode as OptionValue 
	FROM RefCode 
	WHERE RefDomain = @optionsRefDomain
	AND Active = 'Y'
	ORDER BY OptionText

END
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO



